* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px #7c3aed, 0 0 10px #7c3aed; }
    50% { box-shadow: 0 0 20px #7c3aed, 0 0 40px #7c3aed, 0 0 60px #7c3aed; }
}

@keyframes nebula {
    0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    33% { transform: translate(30px, -20px) scale(1.1); opacity: 0.4; }
    66% { transform: translate(-20px, 30px) scale(0.9); opacity: 0.2; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a1a;
    color: #e0e0ff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

#stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.nebula {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.nebula-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15), transparent);
    top: -100px;
    right: -100px;
    animation: nebula 15s ease-in-out infinite;
}

.nebula-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent);
    bottom: -50px;
    left: -100px;
    animation: nebula 20s ease-in-out infinite reverse;
}

.nebula-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08), transparent);
    top: 50%;
    left: 50%;
    animation: nebula 18s ease-in-out infinite 5s;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 0 20px;
}

.logo {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #7c3aed, #3b82f6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 8px;
    text-transform: uppercase;
    animation: float 4s ease-in-out infinite;
    position: relative;
    display: inline-block;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7c3aed, transparent);
}

.tagline {
    color: #8888aa;
    font-size: 1rem;
    margin-top: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.ad-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555577;
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.ad-section.horizontal {
    min-height: 120px;
}

.main-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    animation: glow 4s ease-in-out infinite;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaaacc;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.input-wrapper input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.input-wrapper input::placeholder {
    color: #555577;
}

.btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
}

.btn:hover::after {
    left: 100%;
}

.result-box {
    margin-top: 25px;
    padding: 20px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    display: none;
}

.result-box.show {
    display: block;
    animation: glow 2s ease-in-out infinite;
}

.result-box .short-url {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.result-box .short-url a {
    color: #7c3aed;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

.result-box .short-url a:hover {
    text-decoration: underline;
}

.btn-copy {
    padding: 10px 20px;
    background: rgba(124, 58, 237, 0.3);
    border: 1px solid #7c3aed;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.btn-copy:hover {
    background: #7c3aed;
}

.error-msg {
    color: #ef4444;
    margin-top: 15px;
    font-size: 0.9rem;
    display: none;
}

.error-msg.show {
    display: block;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #7c3aed;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #8888aa;
    font-size: 0.85rem;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #444466;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

/* Redirect Page */
.redirect-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.redirect-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 60px 40px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.countdown-ring {
    width: 160px;
    height: 160px;
    margin: 0 auto 30px;
    position: relative;
}

.countdown-ring svg {
    transform: rotate(-90deg);
}

.countdown-ring .bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 4;
}

.countdown-ring .progress {
    fill: none;
    stroke: url(#progress-gradient);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 439.8;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.countdown-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.redirect-info {
    color: #8888aa;
    font-size: 0.9rem;
    margin-top: 20px;
    letter-spacing: 1px;
}

.redirect-info .url-display {
    color: #ccccee;
    font-weight: 600;
    word-break: break-all;
    margin-top: 5px;
}

.redirect-ad {
    margin-top: 30px;
}

/* Navigation */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin: -20px -20px 10px -20px;
    background: rgba(10,10,26,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-left .nav-logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #7c3aed, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    color: #8888aa;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #7c3aed;
}

.nav-link.premium-link {
    color: #f59e0b;
}

.nav-link.premium-link:hover {
    color: #fbbf24;
}

.nav-user {
    color: #ccccee;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.btn-small {
    padding: 8px 16px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid #7c3aed;
    border-radius: 8px;
    color: #fff !important;
}

.btn-small:hover {
    background: #7c3aed;
}

.nav-btn {
    padding: 8px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-btn-ghost {
    background: rgba(255,255,255,0.05);
    color: #8888aa;
    border: 1px solid rgba(255,255,255,0.1);
}
.nav-btn-ghost:hover {
    color: #e0e0ff;
    background: rgba(255,255,255,0.1);
}
.nav-btn-danger {
    background: rgba(239,68,68,0.1);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.2);
}
.nav-btn-danger:hover {
    background: #ef4444;
    color: #fff;
}
.nav-btn-painel {
    background: rgba(124,58,237,0.15);
    color: #c084fc;
    border: 1px solid rgba(124,58,237,0.3);
}
.nav-btn-painel:hover {
    background: rgba(124,58,237,0.25);
    color: #e0e0ff;
}
.badge-admin {
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(239,68,68,0.15);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.badge-gold {
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.badge-silver {
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(148,163,184,0.15);
    color: #94a3b8;
    border: 1px solid rgba(148,163,184,0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.badge-free {
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.05);
    color: #8888aa;
    border: 1px solid rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.dashboard-stats .stat-card.premium-stat {
    border-color: rgba(245, 158, 11, 0.3);
}

.dashboard-stats .stat-card.premium-stat:hover {
    border-color: #f59e0b;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
}

.dashboard-stats .stat-card.gold-stat {
    border-color: rgba(245, 158, 11, 0.3);
}

.dashboard-stats .stat-card.gold-stat:hover {
    border-color: #f59e0b;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
}

.dashboard-stats .stat-card.admin-stat {
    border-color: rgba(239, 68, 68, 0.2);
}

.dashboard-stats .stat-card.admin-stat:hover {
    border-color: #ef4444;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2);
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.links-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.links-table thead th {
    text-align: left;
    padding: 12px 15px;
    color: #8888aa;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.links-table tbody td {
    padding: 14px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #ccccee;
}

.links-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}
}
@keyframes pulse-entrar {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 87, 51, 0.4); }
    50% { box-shadow: 0 0 20px rgba(255, 87, 51, 0.6), 0 0 30px rgba(255, 87, 51, 0.2); }
}
.nav-btn-entrar {
    background: #ff5733;
    color: #fff;
    border: none;
    animation: pulse-entrar 2s ease-in-out infinite;
}
.nav-btn-entrar:hover {
    background: #ff451a;
    color: #fff;
    transform: translateY(-1px);
}

.td-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-clicks {
    font-weight: 700;
    color: #7c3aed !important;
    text-align: center;
}

.td-date {
    color: #555577 !important;
    font-size: 0.8rem;
    white-space: nowrap;
}

.link-code {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.link-code:hover {
    text-decoration: underline;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge-auto {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.badge-custom {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-admin {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Sort Bar */
.sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ccccee;
    padding: 8px 12px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.sort-select option {
    background: #1a1a2e;
    color: #ccccee;
}

.sort-select:focus {
    border-color: #7c3aed;
}

/* Admin actions */
.td-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.btn-action {
    padding: 6px 14px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 6px;
    color: #7c3aed;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-action:hover {
    background: #7c3aed;
    color: #fff;
}

.btn-small-action {
    padding: 4px 8px;
    font-size: 0.85rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    cursor: pointer;
}

.btn-small-action:hover {
    border-color: #7c3aed;
    background: rgba(124,58,237,0.2);
}

.btn-danger {
    border-color: rgba(239,68,68,0.3);
}

.btn-danger:hover {
    background: #ef4444 !important;
    border-color: #ef4444;
}

.edit-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #ccccee;
    padding: 4px 8px;
    font-size: 0.8rem;
    width: 250px;
    outline: none;
}

.edit-input:focus {
    border-color: #7c3aed;
}

.edit-link {
    color: #ccccee;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px dashed rgba(255,255,255,0.15);
    padding-bottom: 2px;
}

.edit-link:hover {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
}

.back-link {
    color: #8888aa;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-left: 15px;
}

.back-link:hover {
    color: #7c3aed;
}

/* Inline form */
.inline-form {
    display: inline;
}

/* Input with prefix */
.input-with-prefix {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.input-with-prefix:focus-within {
    border-color: #7c3aed;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.input-prefix {
    padding: 16px 0 16px 20px;
    color: #555577;
    font-size: 0.9rem;
    white-space: nowrap;
    font-family: monospace;
}

.input-with-prefix input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 20px 16px 5px;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.input-with-prefix input:focus {
    box-shadow: none;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 0;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked {
    background: #7c3aed;
    border-color: #7c3aed;
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.checkbox-text {
    color: #aaaacc;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Alias status */
.alias-status {
    font-size: 0.8rem;
    margin-top: 5px;
    padding-left: 5px;
    min-height: 20px;
}

.alias-status.available {
    color: #22c55e;
}

.alias-status.error {
    color: #ef4444;
}

.edit-redirect {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.result-box.show .edit-redirect {
    display: flex;
}

/* Upgrade Page */
.upgrade-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.plan-card {
    text-align: center;
    padding: 40px 30px;
    position: relative;
}

.plan-card.current-plan {
    border-color: rgba(255, 255, 255, 0.08);
    animation: none;
    box-shadow: none;
}

.plan-card.premium-plan {
    border-color: rgba(245, 158, 11, 0.3);
}

.plan-card.premium-plan:hover {
    border-color: #f59e0b;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
    animation: none;
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #7c3aed);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 20px;
    border-radius: 20px;
}

.plan-price {
    font-size: 3rem;
    font-weight: 900;
    margin: 20px 0;
    color: #ccccee;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    text-align: left;
}

.plan-features li {
    padding: 10px 0;
    color: #8888aa;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.plan-features.premium-features li {
    color: #ccccee;
}

.premium-btn {
    background: linear-gradient(135deg, #f59e0b, #7c3aed);
    margin-top: 10px;
}

.premium-btn:hover {
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.4);
}

@media (max-width: 768px) {
    .nav-right {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .upgrade-grid {
        grid-template-columns: 1fr;
    }

    .sort-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-nav {
        flex-direction: column;
        gap: 10px;
    }

    .input-with-prefix {
        flex-direction: column;
    }

    .input-prefix {
        padding: 10px 20px 0;
    }

    .input-with-prefix input {
        padding: 10px 20px;
    }
    .main-card {
        padding: 25px;
    }

    .logo {
        font-size: 2.5rem;
        letter-spacing: 5px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .result-box .short-url {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
    }

    .redirect-card {
        padding: 40px 20px;
    }

    .countdown-ring {
        width: 120px;
        height: 120px;
    }

    .countdown-number {
        font-size: 3rem;
    }
}
